package com.pms.service;

import java.util.List;

import com.pms.dao.DataDao;
import com.pms.dao.DocumentDao;
import com.pms.entity.Data;
import com.pms.entity.Document;
import com.pms.util.Page;

public class DataService {
	 
	DataDao dataDao = new DataDao();
	
	public Page<Data> findForList(String projectId ,int pageNum) {
		Page<Data> page = new Page<Data>(5,dataDao.getCount(projectId),pageNum);
		return  dataDao.findForList(projectId, page);
	}

	public Data findDataById(String dataId) {
		Data data = dataDao.findDataById(dataId);
		return data;
		
	}

	public void editData(String title, String describe,String content, String memberId, String projectId, String dataId) {
		 dataDao.editData(title,describe,content,memberId,projectId,dataId);
	}

	public void deleteByDateId(String dataId) {
		 dataDao.deleteByDateId(dataId);
	}

	public void newData(String title, String describe,String content, String memberId, String projectId) {

		dataDao.newData(title,describe,content,memberId,projectId);

	}

	public Data findDateInformationById(String dataId) {
		
		return dataDao.findDateInformationById(dataId);
		
	}


}
